package com.mashibing.util;

public class RedisPrefixUtils {


    private static String redisPrefix = "service-verificationCode-";
    private static String tokenPrefix = "token-";

    /**
     * 生成redis查询key
     * @param passengerPhone
     * @return
     */
    public static String generatePhoneKey(String  passengerPhone){
        return  redisPrefix + passengerPhone;
    }

    /**
     * 根据手机号和身份标识生成token  key
     * @param phone
     * @return
     */
    public static String generateTokenKey(String phone, String identity,String tokenType) {
        return tokenPrefix +phone + "-" + identity +"-" +tokenType;
    }
}
